package com.zygh.lz.service;

import com.github.pagehelper.PageInfo;
import com.zygh.lz.entity.Problem;
import com.zygh.lz.entity.vo.ProblemVO;
import com.zygh.lz.vo.ResultBean;
import com.zygh.lz.vo.ResultBeans;

import javax.servlet.http.HttpServletRequest;
import java.lang.reflect.InvocationTargetException;
import java.text.ParseException;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;


public interface ProblemService {
    //新增
    ResultBeans addProblem(Problem problem);

    //修改
    ResultBean updateProblem(ProblemVO problem) ;

    //删除
    ResultBean delProblem(Integer id);

    //根据人查询全部问题  (所有问题)
    ResultBean selectProblemByStaffId(Integer staffReportId);

    //查询问题解决未解决个数
    ResultBean selectProblemByRosove(Integer id);

    //根据道路类型查询问题
    ResultBean selectAllByRoadType(Integer sysStaffId, String roadType);

    //问题模糊查询
    ResultBean selectDims(Integer sysStaffId, String RoadType, String staffName, String sectionName,
                          String ProblemStrat, String staffHierarchy,
                          String beginTime, String endTime, String problemCheck, String problemDetail);

    //根据人查询问题
    ResultBean selectDimStaff(Integer SysStaffId, String beginTime, String endTime);

    //领导管理的人所查询问题的模糊查询
    ResultBean selectDimStaffOther(Integer SysStaffId, String beginTime, String endTime);

    //巡查记录个数统计
    ResultBean selectDimAll(String startTime, String endTime);

    ResultBean selectDimAllSy();

    //按条件查询没有核查的问题
    ResultBean selectProblem(Integer staffAcceptId, String roadName, String problemStrat);

    //查询所有除去已完成以外的多有问题
    ResultBean selectProblemByState();


    ResultBeans selectProblemByid(Integer id, Integer type) throws InterruptedException, ExecutionException;

    //所有不能解决的问题
    ResultBean selectProbleByStart(String problemState);

    ResultBean selectByProblemdetail(String typeKey,
                                     String problemStrat,
                                     String beginTime, String endTime);

    ResultBean deleteByProblemid(int[] array);

    //首页统计所有
    ResultBean selectAllCount(String sectionname);

    List<Problem> selectBysolution(String solution);

    //待我审批模糊查询
    List<Problem> selectByObscure(String solution, String type, String section, String startTime, String endTime);

    //APP问题记录列表
    ResultBeans selectProblemPecord(Integer staffId, Integer current, Integer size);

    //APP问题核查列表
    ResultBeans selectProblemCheck(Integer staffId, String problemStrat, Integer current, Integer size);

    ResultBean findProblemByAccept(Integer id, Integer pageNum, Integer pageSize);

    ResultBean findProblemByIsRead(Integer id);

    List<Map> findProblemByAppear(Integer id);

    PageInfo<Map> reportedProblem(int id, String startDate, String endDate, Integer current, Integer size);

    List<Map> reportedProblemLine(int id, String startDate, String endDate) throws ParseException;

    List<Map> reportInformation(Integer id);

    int copyTo(Integer problemId, Integer userId);


}
